// 用户模型
export interface User {
  id: string;
  username: string;
  password: string; // 实际应用中应加密存储
  role: 'patient' | 'doctor';
  createdAt: Date;
  lastLogin: Date;
}

// 患者档案模型
export interface PatientProfile extends User {
  realName: string;
  age: number;
  gender: 'male' | 'female' | 'other';
  phoneNumber: string;
  email?: string;
  avatar?: string;
  height?: number; // 身高（厘米）
  weight?: number; // 体重（公斤）
  diseases: ChronicDisease[];
  allergies?: string[];
  medicationHistory?: Medication[];
  emergencyContact?: EmergencyContact;
  doctorId?: string; // 关联的医生ID
}

// 医生档案模型
export interface DoctorProfile extends User {
  realName: string;
  age: number;
  gender: 'male' | 'female' | 'other';
  phoneNumber: string;
  email?: string;
  avatar?: string;
  department: string;
  hospital: string;
  specialty: string;
  qualification: string;
  introduction?: string;
  patientIds?: string[]; // 管理的患者ID列表
}

// 慢性病模型
export interface ChronicDisease {
  id: string;
  name: string; // 疾病名称
  diagnosedDate: Date; // 确诊日期
  severity: 'mild' | 'moderate' | 'severe'; // 严重程度
  notes?: string;
}

// 药物模型
export interface Medication {
  id: string;
  name: string;
  dosage: string;
  frequency: string;
  startDate: Date;
  endDate?: Date;
  purpose: string;
}

// 紧急联系人模型
export interface EmergencyContact {
  name: string;
  relationship: string;
  phoneNumber: string;
}